package com.tanglongan.designPattern.dp11_facade.demo01;

public class GiftFacadeService {
    private final QualifyService qualifyService = new QualifyService();
    private final PaymentService paymentService = new PaymentService();
    private final ShippingService shippingService = new ShippingService();


    public void exchange(Gift gift) {
        if (qualifyService.isAvailable(gift)) {
            if (paymentService.pay(gift)) {
                String delivery = shippingService.delivery(gift);
                System.out.println("物流系统下单成功，订单号是：" + delivery);
            }
        }
    }

}
